<!doctype html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
    <meta name="description" content="">
    <meta name="author" content="">
    <link rel="icon" href="../../../../favicon.ico">

    <title>Simple Blockchain</title>

    <!-- Bootstrap core CSS -->
    <link href="https://cdn.bootcss.com/bootstrap/4.1.1/css/bootstrap.min.css" rel="stylesheet">
</head>

<body>

<div class="jumbotron">
    <h1 class="display-4">Hello, blockchain!</h1>
    <p class="lead">区块链项目入门</p>
    <hr class="my-4">
    <p>区块链项目的简单演示，具体请参照 README</p>
    <a class="btn btn-primary btn-lg" href="https://github.com/Yunlong2cn/SimpleBlockchain" role="button">@Github</a>
    <a class="btn btn-primary btn-lg" href="https://gitee.com/yunlong/SimpleBlockchain" role="button">@Gitee</a>
</div>

<main class="container">
    <div class="alert alert-warning" role="alert">
        当前节点数量：<span th:text="${nodeCount}">0</span>
    </div>
    <div class="card mb-3" th:each="v, i:${blocks}">
        <div class="card-header">区块高度：<span th:text="${v.index}">0</span>(<span th:text="${v.timeStamp}"></span>)</div>
        <div class="card-body">
            <div>节点：<span th:text="${v.nodeName}"></span></div>
            <div>客户端IP：<span th:text="${v.from}">0.0.0.0</span></div>
            <div>上一区块 HASH：<span th:text="${v.preHash}">0</span></div>
            <div>当前区块 HASH：<span th:text="${v.hash}">0</span></div>
            <div>区块内容：<span th:text="${v.data}">0</span></div>
        </div>
    </div>
</main>
<script src="https://code.jquery.com/jquery-3.3.1.slim.min.js" integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo" crossorigin="anonymous"></script>
<script src="https://cdn.bootcss.com/bootstrap/4.1.1/js/bootstrap.min.js"></script>
</body>
</html>
